package com.cuixichang.minimalism.service;

import com.cuixichang.minimalism.transfer.dto.IRouterDTO;
import com.cuixichang.minimalism.transfer.po.IRouter;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
 * 服务接口
 *
 * @author cuixichang
 * @date 2024-12-18
 */
public interface IRouterService{

    IRouterDTO selectById(Long id);

    IRouterDTO selectOne(IRouterDTO iRouterDTO);

    List<IRouterDTO> selectByIds(List<Long> ids);

    List<IRouterDTO> selectList(IRouterDTO iRouterDTO);

    List<IRouterDTO> selectList(IRouterDTO iRouterDTO, BiConsumer<IRouter, QueryWrapper<IRouter>> consumer);

    Page<IRouterDTO> selectPage(IRouterDTO iRouterDTO, long pageSize, long pageNo);

    Page<IRouterDTO> selectPage(IRouterDTO iRouterDTO, long pageSize, long pageNo, BiConsumer<IRouter, QueryWrapper<IRouter>> consumer);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int deleteByCondition(IRouterDTO iRouterDTO);

    int deleteByCondition(IRouterDTO iRouterDTO, BiConsumer<IRouter, QueryWrapper<IRouter>> consumer);

    IRouterDTO insert(IRouterDTO iRouterDTO);

    IRouterDTO insertHasOption(IRouterDTO iRouterDTO, Function<IRouterDTO,IRouterDTO> preOption);

    int updateById(IRouterDTO iRouterDTO);

    int updateById(IRouterDTO iRouterDTO, BiConsumer<IRouter, UpdateWrapper<IRouter>> consumer);
}